package com.xmy.cultivate.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 取消订购（排除订购）
 * </p>
 *
 * @author hpiggy
 * @since 2025-04-12
 */
@Data
@TableName("book_exclude_subscription")
@ApiModel(value = "BookExcludeSubscription对象", description = "取消订购（排除订购）")
public class BookExcludeSubscription implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("年份")
    private Integer yearPart;

    @ApiModelProperty("学期")
    private Integer quarterNum;

    @ApiModelProperty("教材类型，1学生用书，2教师用书，对应dict表type为33")
    private Integer bookTextType;

    @ApiModelProperty("书id")
    private Long bookTextId;

    @ApiModelProperty("1精品课，这里默认为1，现在只有精品课")
    private Integer lessonType;

    @ApiModelProperty("科目")
    private Long subjectsId;

    @ApiModelProperty("班型")
    private Long classTypeId;

    @ApiModelProperty("年级")
    private Long yearClassId;

    @ApiModelProperty("学生用书，按次数类型的第几次，不是按次数的这里默认为0")
    private Integer lessonNum;

    @ApiModelProperty("校区id")
    private Long schoolId;

    @ApiModelProperty("老师id【教师用书取消的教师id】")
    private Long teacherId;

    @ApiModelProperty("学生id【学生用书取消的学生id】")
    private Long studentId;

    @TableField(fill = FieldFill.INSERT)
    private Long createdId;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @ApiModelProperty("是否删除，0正常，1删除")
    @TableLogic(value = "0", delval = "1")
    @TableField(select = false)
    private Integer deleted;

    @TableField(exist = false)
    private List<Long> teacherIdList;

    @TableField(exist = false)
    private List<Long> studentIdList;

}
